exports.index = function* (next) {
  this.data = yield this.service.relations.findAll();
}

exports.create = function* (next) {
  const { data } = this.params;
  this.data = yield this.service.relations.create(data);
}

exports.destroy = function* (next) {
  yield this.service.relations.remove(this.params.id);
}

exports.show = function* (next) {
 this.data = yield this.service.relations.show(this.params.id);
}

exports.update = function* (next) {
  this.data = yield this.service.relations.update(this.params);
}

const rule = {
  description: 'string',
};

exports.createRule = rule;
exports.updateRule = rule;
